using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ClipboardProject
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Clipboard.SetImage(this.pictureBox1.Image);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (Clipboard.ContainsImage())
                this.pictureBox2.Image = Clipboard.GetImage();
            else
            {
                this.pictureBox2.Image = null;
                MessageBox.Show("Text not found in Clipboard");
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Clipboard.Clear();
        }
    }
}